<?php
require_once(LIBRARY_PATH.'/plugins/Static_Compression.php');

function use_stylesheet($file, $path="css", $type="all"){
   $compess = new Static_Compression;
   $file = $compess->compress($file, $path, 'css');
   $style = "<link rel=\"stylesheet\" type=\"text/css\" media=\"".trim($type)."\" href=\"/public/".trim($path)."/".$file['file']."?v=".$file['v']."\" />\n";

   return $style;
}

function use_javascript($file, $path="js"){
   $compess = new Static_Compression;
   $file = $compess->compress($file, $path, 'js');

    $js = "<script type=\"text/javascript\" src=\"/public/".trim($path)."/".$file['file']."?v=".$file['v']."\" ></script>\n";

    return $js;
}
